package com.swang.redis.service.handler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.core.StringRedisTemplate;

/**
 * @ClassName:RedisMultiService
 * @Description:多实例redis服务
 * @date:2017年03月10 10:52
 */
//@Service("redisMultiService")
public class RedisMultiServiceImpl extends RedisBaseOperate {

    private final static Logger LOGGER = LoggerFactory.getLogger(RedisMultiServiceImpl.class);


    @Autowired
    @Qualifier("clusterStringRedisTemplate")
    private StringRedisTemplate stringMultiRedisTemplate;

    @Override
    protected void printLog(String key) {
        LOGGER.info("分布式redis调用 key:" + key);
    }

    @Override
    public StringRedisTemplate getStringRedisTemplate() {
        return stringMultiRedisTemplate;
    }
}
